1. Field of the Invention
The present invention relates to a focus detection apparatus and a focus detection method for an image capturing apparatus such as a digital camera.
2. Description of the Related Art
Conventionally, a phase difference detection method is well-known in general as an automatic focus detection method for cameras. With the phase difference detection method, light beams that come from an object and have passed through different exit pupil areas of a taking lens are caused to form an image on a pair of line sensors, which are photoelectric conversion devices (AF sensors) for focus detection. The focusing state of the taking lens is detected by calculating a focus statesition of a pair of object images obtained by performing photoelectric conversion with the pair of line sensors (hereinafter referred to as “phase difference calculation”). Recently, various kinds of AF sensors have been proposed in which a plurality of line sensors are arranged such that focusing states of a plurality of areas in a screen can be detected.
For example, Japanese Patent No. 3854704 discloses the following control. That is to say, photoelectric conversion elements are arranged at positions corresponding to a plurality of focus detection areas, accumulation time is controlled for respective areas 1 to n by sequentially circulating through and monitoring the area 1 to the area n, and the gain at the time of reading out a pixel signal is appropriately controlled for each area. The pixel signal can be read out with an appropriate gain even when the object has different luminance levels, by appropriately controlling charge accumulation for each area.
Japanese Patent Laid-Open No. 2012-042597 proposes a focus detection apparatus that detects an abnormal signal within an image signal of a focus detection sensor and performs correlation calculation after excluding the abnormal signal.
However, with the focus detection apparatus using the photoelectric conversion device disclosed in Japanese Patent No. 3854704, the circulation cycle is lengthened, possibly resulting in a delay of accumulation end timing. In particular, in the case where the object has a super-high luminance, in some cases a signal of the super-high luminance area exceeds the dynamic range of the photoelectric conversion element or an AD converter while signals of other areas are monitored, which consequently causes a decrease in focus detection accuracy.
With the conventional technique disclosed in Japanese Patent Laid-Open No. 2012-042597 mentioned above, since the calculation is performed based on a correlation amount among a plurality of shifted waveforms, the number of excluded pixels differs depending on the shift amount in pixel signal columns when the correlation calculation is performed after excluding abnormal pixels. While the details thereof will be described later, the correlation amount is a value obtained by adding up differences between paired image signals of the pixels, and if the number of pixels used in the calculation differs, it may be possible that comparison between correlation amounts obtained for respective shift amounts may be inaccurate, and the focus detection accuracy decreases.